def strindex(s, t):
    start = 0
    end = start + len(t)
    while end < len(s):
        end = start + len(t)
        tem = s[start:end]
        if tem == t:
            res = start
        start += 1
    return res


s = input()
t = input()
print(strindex(s, t))
